<h1>pyro:pages</h1>

<p>The <em>pages</em> tag displays page info.</p>

<h2>Tags</h2>

<h3>{pyro:pages:url}</h3><br />

<p>Gets a page's URL based on its ID.</p>

<p><strong>Parameters</strong></p>

<table cellpadding="0" cellspacing="0">

	<tr>
		<th>Parameter</th>
		<th>Default</th>
		<th>Description</th>
	</tr>
	
	<tr>
		<td width="100">id</td>
		<td width="100"></td>
		<td>Required. Page ID the URL the tag should return.</td>
	</tr>

</table>

<p><strong>Example</strong></p>

<pre><code>{pyro:pages:url id="4"}​</code></pre>

<pre><code>http://www.example.com/about</code></pre>

<br />

<h3>{pyro:pages:children}</h3><br />

<p>Tag pair that loops through the children of a parent page.</p>

<p><strong>Parameters</strong></p>

<table cellpadding="0" cellspacing="0">

	<tr>
		<th>Parameter</th>
		<th>Default</th>
		<th>Description</th>
	</tr>
	
	<tr>
		<td width="100">id</td>
		<td width="100"></td>
		<td>Required. Page ID of the page you want the children for.</td>
	</tr>

	<tr>
		<td width="100">limit</td>
		<td width="100"></td>
		<td>Required. Number of items to return.</td>
	</tr>

</table>

<p><strong>Example</strong></p>

<pre><code>{pyro:pages:children id="1" limit="2"}
	&lt;h2&gt;{title}&lt;/h2&gt;
	{body}
{/pyro:pages:children}</code></pre>

<pre><code>&lt;h2&gt;Child One&lt;/h2&gt;
Body Content One
	
&lt;h2&gt;Child Two&lt;/h2&gt;
Body Content Two
</code></pre>

<br />

<h3>{pyro:pages:display}</h3><br />

<p>
	A tag that allows any one page to be displayed inside other content. Can be used as a double tag for
	ultimate control or a single tag to output the page body only.
</p>

<p><strong>Parameters</strong></p>

<table cellpadding="0" cellspacing="0">

	<tr>
		<th>Parameter</th>
		<th>Default</th>
		<th>Description</th>
	</tr>
	
	<tr>
		<td width="100">id</td>
		<td width="100"></td>
		<td>ID of the page you want to display.</td>
	</tr>

	<tr>
		<td width="100">slug</td>
		<td width="100"></td>
		<td>Slug of the page you want to display.</td>
	</tr>

</table>

<p><strong>Examples</strong></p>

<pre><code>{pyro:pages:display slug="home"}
	&lt;h2&gt;{title}&lt;/h2&gt;
	{body}
{/pyro:pages:display}</code></pre>

<pre><code>&lt;h2&gt;Page Title&lt;/h2&gt;
&lt;p&gt;Page Body&lt;/p&gt;
</code></pre>

<br />

<pre><code>{pyro:pages:display slug="home"}</code></pre>

<pre><code>&lt;p&gt;Page Body&lt;/p&gt;
</code></pre>

<br />

<h3>{pyro:pages:is}</h3><br />

<p>A tag that says if a page is direct child of another page or is descendent of another page.</p>

<p><strong>Parameters</strong></p>

<table cellpadding="0" cellspacing="0">

	<tr>
		<th>Parameter</th>
		<th>Default</th>
		<th>Description</th>
	</tr>
	
	<tr>
		<td width="100">child</td>
		<td width="100"></td>
		<td>ID or Slug of the page you want check relation.</td>
	</tr>

	<tr>
		<td width="100">children</td>
		<td width="100"></td>
		<td>Child separated by comma.</td>
	</tr>

	<tr>
		<td width="100">parent</td>
		<td width="100"></td>
		<td>ID or Slug of the page to check if is parent of child.</td>
	</tr>

	<tr>
		<td width="100">descendent</td>
		<td width="100"></td>
		<td>ID or Slug of the page to check if is descendent of child.</td>
	</tr>

</table>

<p><strong>Example</strong></p>

<pre><code>{if '{pyro:pages:is child="ingredients" parent="cookbook"}' == true}
&lt;p&gt;
    Click here to see table of contents cookbook
    etc...
&lt;/p&gt;
{/if}

Display:

Click here to see table of contents cookbook
etc...</code></pre>

<pre><code>{if '{pyro:pages:is child="terms-and-conditions" parent="information"}' == true}
&lt;body class="terms information"&gt;
{else}
&lt;body class=""&gt;
{/if}

Display:

&lt;body class="terms information"&gt;</code></pre>